OBJS = obj/ppm_funcs.o
FMATH = -lm

main :
	$(info Usage: make ( bin/mpiSmooth | bin/seqSmooth | bin/cudaSmooth | obj/ppm_funcs.o | bin/fileCreator ))

bin/mpiSmooth : src/mpiSmooth.c obj/ppm_funcs.o include/mpi.h
	mpicc src/mpiSmooth.c $(OBJS) -o bin/mpiSmooth $(FMATH) -Wall

bin/cudaSmooth : src/cudaSmooth.cu obj/ppm_funcs.o
	nvcc src/cudaSmooth.cu $(OBJS) -arch=sm_20 -o bin/cudaSmooth

bin/seqSmooth : src/seqSmooth.c obj/ppm_funcs.o
	$(CC) src/seqSmooth.c $(OBJS) -o bin/seqSmooth -Wall

obj/ppm_funcs.o : src/ppm_funcs.c include/ppm_funcs.h
	$(CC) -c src/ppm_funcs.c -o obj/ppm_funcs.o -Wall

bin/fileCreator : src/fileCreator.c
	$(CC) src/fileCreator.c -o bin/fileCreator -Wall

clean :
	rm -r obj/*.o bin/*